﻿using Baidu.Push.Api.Response;
using Baidu.Push.Api.Util;
using System;
using System.Collections.Generic;
using System.Text;

namespace Baidu.Push.Api.Request
{
    /// <summary>
    /// 服务端删除用户标签。特别地，当user_id被提交时，服务端将只会完成解除该用户与tag绑定关系的操作。
    /// </summary>
    public class DeleteTagRequest : IPushRequest<DeleteTagResponse>
    {
        public string UserId { get; set; }
        public string Tag { get; set; }

        #region IPushRequest

        public string GetApiName()
        {
            return "delete_tag";
        }

        public IDictionary<string, string> GetParameters()
        {
            PushDictionary parameters = new PushDictionary();
            parameters.Add("user_id", this.UserId);
            parameters.Add("tag", this.Tag);
            return parameters;
        }

        public void Validate()
        {
            RequestValidator.ValidateRequired("tag", this.Tag);
        }

        #endregion
    }
}
